package com.shxzz.easy12306.framework.starter.designpattern.config;

import com.shxzz.easy12306.framework.starter.designpattern.chain.AbstractChainContext;
import com.shxzz.easy12306.framework.starter.designpattern.strategy.AbstractStrategyChoose;
import org.springframework.boot.autoconfigure.condition.ConditionalOnMissingBean;
import org.springframework.context.annotation.Bean;

/**
 * 设计模式自动装配
 * @author shxzz
 * @create 2024-02-20-18:34
 */
public class DesignPatternAutoConfiguration {
    @Bean
    @ConditionalOnMissingBean
    public AbstractChainContext abstractChainContext() {
        return new AbstractChainContext();
    }

    @Bean
    @ConditionalOnMissingBean
    public AbstractStrategyChoose abstractStrategyChoose() {
        return new AbstractStrategyChoose();
    }
}